﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="Products.aspx.cs" Inherits="WebShop_Project.Products" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="wrapper2page">
        <div id="wrapperpage">
            <asp:ListView ID="ListViewArticles" runat="server" DataSourceID="ObjectDataSource1" DataKeyNames="ArticleID" OnItemCommand="ListViewArticles_ItemCommand">
              <EmptyDataTemplate>
                    <span>No data was returned.</span>
                </EmptyDataTemplate>
                <ItemTemplate>
                    <div class="col-3">
                        <img width="200" src='<%# Eval("ArticleImagePath") %>' title='<%# Eval("ArticleName") %>' />
                        <br />             
             <h4><asp:Label CssClass="Label" ID="ArticleNameLabel" runat="server" Text='<%# Eval("ArticleName") %>' /></h4>                      
                        CategoryID:
        <asp:Label CssClass="Label" ID="CategoryIDLabel" runat="server" Text='<%# Eval("CategoryID") %>' />
                        <br />
                        UnitPrice:
        <asp:Label CssClass="Label" ID="UnitPriceLabel" runat="server" Text='<%# Eval("UnitPrice", "{0:c2}") %>' /> 
                        <br />
                        <asp:Button ID="ButtonAddToShoppingCart" runat="server" Text="Lägg till" />
                        <br />
                    </div>
                </ItemTemplate>
                <LayoutTemplate>
                    <div id="itemPlaceholderContainer" runat="server" class="productlist">
                        <span runat="server" id="itemPlaceholder" />
                    </div>
                    <div style="">
                    </div>
                </LayoutTemplate>

            </asp:ListView>
            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetArticles" TypeName="WebShopData.Articles"></asp:ObjectDataSource>
            <br />
            
        </div>
    </div>
</asp:Content>
